package com.autumn.zero.workflow.application.dto.forms;

import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.Length;

import com.autumn.common.api.application.dto.DefaultEntityDto;
import com.autumn.util.excel.annotations.ExcelColumn;
import com.autumn.validation.annotation.NotNullOrBlank;
import com.autumn.zero.workflow.entitys.WorkflowForm;

/**
 * 工作流表单输入
 * 
 * @author 老码农 2018-12-20 00:03:13
 */
public class WorkflowFormDto extends DefaultEntityDto {

	/**
	 * 
	 */
	private static final long serialVersionUID = 7187970141659485486L;

	/**
	 * 表单类型
	 */
	@NotNull(message = "表单类型不能为空")
	@ExcelColumn(order = 1, friendlyName = "表单类型", width = 80)
	private Integer formType;

	/**
	 * 
	 */
	@NotNullOrBlank(message = "表单名称不能为空")
	@Length(max = WorkflowForm.MAX_FORM_TYPE_NAME_LENGTH, message = "表单名称长度不能超过"
			+ WorkflowForm.MAX_FORM_TYPE_NAME_LENGTH + "个字。")
	@ExcelColumn(order = 2, friendlyName = "表单名称", width = 120)
	private String formName;

	/**
	 * 摘要
	 */
	@Length(max = WorkflowForm.MAX_SUMMARY_LENGTH, message = "摘要长度不能超过" + WorkflowForm.MAX_SUMMARY_LENGTH + "个字。")
	@ExcelColumn(order = 20, friendlyName = "摘要", width = 300)
	private String summary;

	/**
	 * 
	 */
	public WorkflowFormDto() {

	}

	/**
	 * 获取表单类型
	 * 
	 * @return
	 */
	public Integer getFormType() {
		return formType;
	}

	/**
	 * 设置表单类型
	 * 
	 * @param formType 表单类型
	 */
	public void setFormType(Integer formType) {
		this.formType = formType;
	}

	/**
	 * 获取表单类型名称
	 * 
	 * @return
	 */
	public String getFormName() {
		return formName;
	}

	/**
	 * 设置表单名称
	 * 
	 * @param formName 表单名称
	 */
	public void setFormName(String formName) {
		this.formName = formName;
	}

	/**
	 * 获取摘要
	 * 
	 * @return
	 */
	public String getSummary() {
		return summary;
	}

	/**
	 * 设置摘要
	 * 
	 * @param summary 摘要
	 */
	public void setSummary(String summary) {
		this.summary = summary;
	}
}
